package com.ykht.proj.coupon.Enum;

/**
 * cms文章 推荐状态 枚举类
 */
public enum RecommendStatusEnum {
	//推荐状态 0待开始 1进行中 2已结算
	TO_START(0,"待开始"),
	AT_WORK(1,"进行中"),
	BE_OVERDUE(2,"已结算");

	private Integer value;
	private String desc;

	private RecommendStatusEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		RecommendStatusEnum[] values = RecommendStatusEnum.values();
		for (RecommendStatusEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
